package tgc.edu.xzy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import tgc.edu.xzy.custom.CommonService;
import tgc.edu.xzy.entity.Invoice;
import tgc.edu.xzy.repostory.InvoiceRepository;

@Service
public class ElectronicService extends CommonService<Invoice, Integer>{
	@Autowired
	private InvoiceRepository electronicDAO;

	public Page<Invoice> findByLesseeLesseeAdminId(Integer id, Pageable pageable) {
		return electronicDAO.findByLesseeLesseeAdminId(id,pageable);
	}

	public Page<Invoice> findByLesseeLesseeAdminId(Integer id, Specification<Invoice> buildSpes, Pageable pageable) {
		return electronicDAO.findByLesseeLesseeAdminId(id,buildSpes,pageable);
	}
}
